import request from '@/api/request'

// 登录
export const login = (data) => {
  return request({
    url: '/auth/login',
    method: 'post',
    data
  })
}

// 注册
export const register = (data) => {
  return request({
    url: '/auth/register',
    method: 'post',
    data
  })
}

// 登出
export const logout = () => {
  return request({
    url: '/auth/logout',
    method: 'post'
  })
}

// 获取用户权限
export const getUserPermissions = () => {
  return request({
    url: '/auth/permissions',
    method: 'get'
  })
}

// 获取用户菜单
export const getUserMenus = () => {
  return request({
    url: '/auth/menus',
    method: 'get'
  })
}

// 获取用户信息
export const getUserInfo = () => {
  return request({
    url: '/auth/info',
    method: 'get'
  })
}

// 获取用户详细信息（调试用）
export const getDebugUserInfo = () => {
  return request({
    url: '/auth/debug/user-info',
    method: 'get'
  })
} 